package com.hmdp.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 寒士obj
 * @date 2025/07/06 15:45
 **/
@Configuration
public class RedissionConfig {
    @Bean
    public RedissonClient redissonClient() {
        Config config = new Config();
        // 创建单一服务器连接
        config.useSingleServer().setAddress("redis://120.46.5.5:6379").setPassword("123456");
        return Redisson.create(config);
    }
}
